<template>
    <div id="index-container" >
        <el-container direction="vertical">
            <el-header style="">
                <Search></Search>
            </el-header>
            <el-divider></el-divider>
            <el-main><div id="map-container" style="width: 80%;height: 80%"><MapContainer @location-update="fowardLocation"></MapContainer></div></el-main>
            <el-divider></el-divider>
        </el-container>
    </div>
</template>

<script>
import MapContainer from '../components/map/MapContainer.vue'
import Search from '../components/map/Search.vue'

export default {
    methods:{
        fowardLocation(location){
            this.$emit('location-update',location)
        }
    },
    components:{
        MapContainer,
        Search
    }
}
</script>

<style lang="less" scoped>
#index-container{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;

}
</style>